<%@ page language="java" pageEncoding="UTF-8"%>
<%@include file="/views/common/include/taglib.jsp"%>
	<link type="text/css" rel="stylesheet" href="${ctx }/css/dlifestyle/sectionparent.css" source="widget" />
	<link type="text/css" rel="stylesheet" href="${ctx }/css/dlifestyle/apply.css" source="widget" />
	<script src="${ctx}/js/controllers/store/personalinfo/personalInfoListController.js" type="text/javascript"></script>
	<style>
	
	.itemEdit{
	padding-top:21px;
	}
	.fldetail-4l{
		margin-left:0px;
	}
	.fldetail-4r{
	margin-left:0px;
	}
	</style>
          <div style="top:130px;position:fixed;height:30px;font-size: 14px;font-family: '微软雅黑';margin-left:-236px;">
				当前位置：${sessionScope.currcent_position}
          </div>
          <section>
                <!--begin 搜索栏 -->
                  <div class="panel" style="margin-top:16px;">
                  <div class="forword_area"></div>
					<div class="location">个人信息</div>
					</div>
	                   <div id="form" class="form" style="min-height:300px;border: 1px solid #e6e6e6;">
								  
									<div class="itemEdit">
										 <span class="col-sm-1 editlableDetail" style="font-size:14px;width:55px;"><em class="emStyle">*</em>账户：</span>
										 <div class="fldetail-4l" style="width:200px;" >
										    <input id="userId" type="hidden" value="${userInfo.id}">
											<input class="controlEdit" id="loginname" type="text" value="${userInfo.loginname}" disabled="disabled"
											 style="border-bottom: 0;width:200px;" class="text" maxlength="20" />
										</div>
										<span class="col-sm-1 editlableDetail" style="font-size:14px;margin-left: 70px;width:55px;"><em class="emStyle">*</em>电话:</span>
										<div class="fldetail-4r" style="width:200px;" >
											<input type="hidden" id="phone" value="${userInfo.phone}"/>
											<input class="controlEdit" id="phonecopy" type="text" style="border-bottom: 0;"  
											   disabled="disabled"  value="${userInfo.phone}">
										</div>
									</div>
									<div class="itemEdit">
										<span class="col-sm-1 editlableDetail" style="font-size:14px;width:55px;width:55px;"><em class="emStyle">*</em>昵称：</span>
										<div class="fldetail-4l" style="width:200px;" >
											 <input class="controlEdit" style="width:200px; id="nickname" type="text" maxlength="11" class="input-sm" value="${userInfo.nickname}" >
										     
										</div>
										<span class="col-sm-1 editlableDetail" style="font-size:14px;width:55px;margin-left: 70px"><em class="emStyle">*</em>姓名：</span>
										<div class="fldetail-4r" style="width:200px;" >
											 <input class="controlEdit" style="width:200px;" id="username" type="text" maxlength="11" class="input-sm" value="${userInfo.username}" >
										    
										</div>
									</div>
									<div class="itemEdit">
										<span class="col-sm-1 editlableDetail" style="font-size:14px;width:55px;"><em class="emStyle">*</em>性别：</span>
										<div class="fldetail-4l" style="width:200px; margin-top: 5px;">
										<input id="sex1" name="sex" type="radio" <c:if test="${sex==1 }">  checked="checked"  </c:if> value="1" style="float:left;margin-left:10px;"/>
										<label class="radio" style="padding-top:0px; margin-top: -3px;" >&nbsp;男</label>
			  				            <i></i>
							            <input id="sex0" name="sex" type="radio" <c:if test="${sex==0 }">  checked="checked"  </c:if> value="0" style="float:left;margin-left:46px;"/>
							            <label class="radio" style="padding-top:0px; margin-top: -3px;">&nbsp;女</label>
							            <i></i>
										</div>
										<span class="col-sm-1 editlableDetail" style="font-size:14px;width:55px;margin-left: 70px"><em class="emStyle">*</em>邮箱：</span>
										<div class="fldetail-4r"style="width:200px;" >
											 <input class="controlEdit" style="width:200px;" id="email" type="text" maxlength="30" class="input-sm" 
											 onblur="checkEmial()" value="${userInfo.email}" >
										    
										</div>
									</div>
									<div class="itemEdit">
										<span class="col-sm-1 editlableDetail" style="font-size:14px;width:120px;"><em class="emStyle">*</em>上次登录时间：</span>
										<div class="fldetail-4l" style="margin-left: 0;width:150px;font-size: 14px;margin-top: 3px;">
										     <fmt:formatDate value="${userInfo.lastLoginTime}" pattern="yyyy-MM-dd"/>
										</div>
										<span class="col-sm-1 editlableDetail" style="font-size:14px;width:90px;">登录次数：</span>
										<div class="fldetail-4r" style="margin-left:0px;" >
											 <input class="controlEdit" style="width:200px;border-bottom: 0;" id="loginTimes" type="text" maxlength="11" class="input-sm" value="${userInfo.loginTimes}" >
										    
										</div>
									</div>
									<div style="height:158px;width:150px;float:right;margin-right:69px;">
							<input id="userId" type="hidden" value="${userInfo.id }">
						    <input id="imageLogo" type="hidden" value="${userInfo.logo }">
						    <div class="flEditMap1" style="margin-right:69px;width:150px;height:158px;margin-top: -200px;">
								<c:if test="${userInfo.logo == null || userInfo.logo == ''}">
									<img id="preview3" style="width:150px;height:158px;margin-right:69px; margin-left: -10px;margin-top: -40px;" title="快上传头像吧" src="${ctx}/images/store/default.png" />
							   </c:if>
							   <c:if test="${userInfo.logo != null && userInfo.logo != ''}">
								    <img id="preview3" style="width:150px;height:158px;margin-right:69px; margin-left: -10px;margin-top: -40px;" src="${sessionScope.image_logo}${userInfo.logo}" />
							   </c:if>
						   </div>
						    <div>
							    	  <div class="fl" style="margin-left: 15px; margin-top: -40px;">
							    		  <button style="width:100px;height:30px;background-color: #F9C771;border-radius: 4px;color: #fff;margin-top: 10px;border: 0px;" class="acblu tctpsc">上传头像</button>
							          </div>
							      </div>
							<%@include file="/views/common/uploader/picture.jsp" %>
						</div>	

					</div>
							<div class="foot">
							<div>
								<div style="float:left;padding-left:40%;padding-top:19px">
									<button class="buttonEdit" onclick="savePersonalInfo();">保&nbsp;&nbsp;存</button>
								</div>
								<!-- <div style="float:left;margin-left:2%;padding-top:19px">
									<button class="buttonCancle" onclick="cancel();">取&nbsp;&nbsp;消</button>
								</div> -->
								</div>
							</div>
				
              </section>
		<script type="text/javascript">
		var ctx = '${ctx}';
		setCtx(ctx);
		var phonecopy = $("#phonecopy").val();
		$("#phonecopy").val(phonecopy.substr(0,3) + "****" + phonecopy.substr(7,phonecopy.length+1));
		
		//实现选中取消切换图片
		$("tbody td>img").toggle(function(){    
		    $(this).attr("src","${ctx }/images/tables/honggou.png"); 
		    //$(this).parents("tr").children().each(function(){
			   // $(this).css("background","#D3F0F1");
		   //});    
		},function(){    
		    $(this).attr("src", "${ctx }/images/tables/wugou.png"); 
		    //$(this).parents("tr").children().each(function(){
			    //$(this).css("background","");
		   //});
		    });
		    
		//实现全选切换所有选项图标
		$("#all").toggle(function(){    
		    $(this).attr("src","${ctx }/images/tables/honggou.png"); 
		    $("tbody td>img").attr("src","${ctx }/images/tables/honggou.png");  
		},function(){    
		    $(this).attr("src", "${ctx }/images/tables/wugou.png"); 
		    $("tbody td>img").attr("src","${ctx }/images/tables/wugou.png");  
		    });
	</script>
	
	<!-- 解决ie 6 7 8 9不能显示placeholder的问题 -->
	<script src="${ctx}/js/lib/jquery.JPlaceholder.js"></script>
